package com.student.service.impl;

import com.student.bean.SportIndex;
import com.student.mapper.SportIndexMapper;
import com.student.service.SportIndexService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service
public class SportIndexServiceImpl implements SportIndexService {
    @Resource
    private SportIndexMapper sportIndexMapper;

    @Override
    public boolean insertSportIndex(Integer run, Integer rope, Integer foot, Integer situp, Integer pushup, Integer plank, Date date, Integer user_id) {
        return sportIndexMapper.insertSportIndex(run, rope, foot, situp, pushup, plank, date, user_id);
    }

    @Override
    public List<SportIndex> selectSportIndex(Date date) {
        System.out.println("根据时间查询" + sportIndexMapper.selectSportIndex(date));
        return sportIndexMapper.selectSportIndex(date);
    }

    @Override
    public boolean updateSelect(Integer run, Integer rope, Integer foot, Integer situp, Integer pushup, Integer plank, Date date) {
        return sportIndexMapper.updateSelect(run, rope, foot, situp, pushup, plank, date);
    }

    @Override
    public boolean deleteDate(Date date) {
        return sportIndexMapper.deleteDate(date);
    }
}
